#include<iostream>
#include<map>
#include<string>
#include<stdio.h>
#include<string.h>
using namespace std;

void test();
void test2(string str);
std::map<std::string, std::string> *mapcli;  //参数

int main(){
 test();
}


void test()
{

char an[20] = {"123 /0 \0 sw a"};
	
string str;
str.append(an,20);



cout<<str.c_str()<<endl;

cout<<str<<endl;

cout<<str.data()<<endl;

cout<<str.length()<<endl;



	  test2(str);

}

void test2(string str){

cout<<str<<endl;

cout<<str.data()<<endl;

cout<<str.length()<<endl;


char charstr[30];

memcpy(charstr,str.c_str(),20);

for(int i=0;i<20;i++){

cout<<charstr[i];



}



}

